-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for base/abstractarray.jl
#12086
Conversation
Wonderful! I'll look at this closer tonight. That julia> map(x->ind2sub((2,3), x), 1:6)
6-element Array{Tuple{Int64,Int64},1}:
(1,1)
(2,1)
(1,2)
(2,2)
(1,3)
(2,3)
julia> ind2sub((2,3), 1:6)
([1,2,1,2,1,2],[1,1,2,2,3,3]) I'm not sure if it's used in base, but I think it'd be useful for some of the sparse array implementations. |
@@ -110,6 +124,7 @@ function test_scalar_indexing{T}(::Type{T}, shape) | |||
for i1 = 1:size(B, 1) | |||
i += 1 | |||
@test A[i1,i2,i3] == B[i1,i2,i3] == i | |||
# @test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extraneous comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that should definitely be there... >_>
I'll take that out. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries. Don't rebase until the tests are done, because this won't affect them.
Ahah! Thank you for the explanation, Matt. |
Looks like you've got some test errors. Can you fix and update the PR? Might be worth running a |
Revised (with test for |
I'm not familiar with the AppVeyor system. My sense is this build failure appears to be due to a timeout. How ought I to proceed? |
It is due to a timeout. The fact that it passed on Travis and Win32 mean there's (probably!) nothing wrong with your tests. @mbauman said he'd take a look in a bit but I see no reason not to merge. Thanks for these great tests :). Someone will owe you a 🍺 very soon. |
Yup, looks like a freeze during bootstrap — since this only touched test files it's unrelated. The only minor comment I have is that I don't think we should define the This is great, thank you again! |
@kshyatt w00t! Glad I could help. @mbauman That makes sense. For some reason I had been minding the Unrelated: I don't suppose there's any way to make this combination of emojis work in GitHub, is there? http://emoji.octopus.holdings/ |
Squashed: -Revision to fix error -Add test for `ind2sub` method -Remove definitions for `Base.unsafe_*` methods for test types; these methods should be tested against their definitions in Base
🏆 |
Add tests for `base/abstractarray.jl`
Folks, please don't merge things when there's a freeze during bootstrap. That is almost always a real problem, and continuing to merge unrelated changes on top of a broken build means additional chances to introduce more platform-specific breakage. Also, get off my lawn! |
Ok, but if we can't restart/requeue the AV run then how are we supposed to check if something is ok? |
Anyone with commit access should be able to restart jobs on appveyor. You have to login under the StefanKarpinski account to do so, which is a little confusing. |
ref #10579 (comment) |
Ok, I got it to work! Thanks @tkelman. Is it ok for me to requeue others that had the timeout if the queue is empty (as it is now)? |
I don't expect anything to have changed on master, so I'm not sure what good re-queuing would do right this second. |
I was asking more in general. I requeued my PR to figure out how to do it. You can cancel it if you want :) |
In general, yeah restarting builds is fine if you think something fell victim to an intermittent problem, better safe than sorry. Especially when appveyor is idle which it should be much more often now that we have 2 concurrent workers. On-topic for this PR, note that there are deprecation warnings when you run in one worker via
|
@tkelman That's from testing the As far as other machines with In any case, thank you to everybody who's helped me navigate through getting these tests merged (if slightly prematurely)! @hayd But it's arms aren't held up high enough to make it look like it's holding the trophy! Oh well, I guess that will have to suffice. |
I believe when |
@tkelman Would straight up imitating this whole |
I think you'd need the whole thing, not just the |
@ScottPJones right, I meant replacing the current Just checking: the reason a |
Mostly this. Every so often a name conflict in dummy test variables will lead to tests failing in funny ways, I actually had to debug exactly this problem just a few days ago. It can depend on which order different workers run which sets of tests, or only fail if you run in a single worker, etc so it's not always obvious what the issue is when this happens. |
@tkelman - I figured this one was pretty safe. But you're right, I've triggered more than my fair share of Win64 breakages, and I should have just been patient. I can't wait to give LLVM 3.3 the boot. @davidagold - sounds like a good plan. Want to make a small PR? Note that since your tests are in a function you don't need to worry about the let block (since they're already scoped)… although I suppose the same sort of collision could happen between two methods of the inadvertently-same-named generic function. That'd be a bear to debug, too. Is there a reason why we're not just using modules for each test file? |
@mbauman Would be happy to! What in particular about LLVM 3.3 makes the Win64 build seize up? I take it that 3.4 will be better -- when does that get to be incorporated into Julia? |
As long as we're able to get back to green without too much wasted time on other PR's, it's alright. I'd really like us to get to a state where master cannot be broken, but lacking the infrastructure to automatically enforce that it'll have to be a cultural thing. Will also be challenging given the number of intermittent failures we seem to hit. http://graydon2.dreamwidth.org/1597.html Ref #9798 for automatically putting each test in a separate module. That might help the sandboxing if someone wants to pick that up and get it working. @davidagold see #9336. The biggest issue is a major regression in codegen performance that'll have to be worked out. LLVM upstream is working on 3.7 right now, should be out in August, that'll be the first newer-than-3.3 version we can use that has working backtraces on OSX. |
@tkelman Thank you for the resources. Some of the test function names are pretty generic (like |
Cross-reference to new PR that addresses issues raised above: #12111 |
This PR adds tests for the
AbstractArray
interface inbase/abstractarray.jl
. Facets of the interface that ought to see increased coverage include primitives, indexing & internals, concatenation, map, and possibly the deprecation warning if that works out on the remote machine (I think I've got the gist of that...).I'd love to include a test for
at
julia/base/abstractarray.jl
Line 1039 in 686bd24
Cross-referencing: #11885 to help coordinate the coverage push and pinging @mbauman who may be interested/be able to help me clean up any mess and make the PR better, if he is able and willing.
Any and all suggestions are welcome. Thanks!